<!--职位管理页-->
<template>
  <!-- 职位管理搜索卡片 -->
  <el-card style="margin:20px;height: 70px;">
    <el-form :inline="true">
      <el-form-item label="职级名称">
        <el-input placeholder="请输入内容" style="width:220px;" v-model="searchLevelForm.levelName"></el-input>
      </el-form-item>
      <el-form-item>
        <el-button @click="resetSearch">重置</el-button>
        <el-button type="primary" @click="loadLevel">查询</el-button>
      </el-form-item>
    </el-form>
  </el-card>
  <!-- 职位管理列表 -->
  <el-card style="margin:20px;">
    <el-table :data="LevelArr">
      <el-table-column type="selection" width="80"></el-table-column>
      <el-table-column type="index" label="编号" width="80" align="center"/>
      <el-table-column prop="brand" label="职级名称" align="center">
      </el-table-column>
      <el-table-column prop="license" label="职级编号" align="center"/>
      <el-table-column prop="type" label="职等" align="center"/>
      <el-table-column label="操作" align="center">
        <template #default="scope">
          <el-button link type="primary" size="small" @click="editLevel(scope.row.id)">编辑</el-button>
          <el-button link type="primary" size="small" @click="deleteLevel(scope.row.id)">删除</el-button>

        </template>
      </el-table-column>



    </el-table>
  </el-card>
</template>
<script setup>
import {onMounted, ref} from "vue";
//定义对象用来收集搜索卡片表单的数据
const searchLevelForm = ref({
  levelName: '',//职级名称
});
//定义搜索卡片重置按钮的功能 清空值+重新加载车辆
const resetSearch = ()=>{
  searchLevelForm.value = {};
  loadLevel();
}
const loadLevel = ()=>{

}
//定义数组用来保存组织表格数据
const LevelArr = ref([]);
//定义编辑职位管理的方法
const editLevel = (id)=>{

}
//定义删除指定职位管理的方法
const deleteLevel = (id)=>{

}
//onMounted() VUE的生命周期钩子 在DOM渲染完毕后立即执行
onMounted(()=>{
  loadLevel();
})


</script>